function columns(vm) {
  const cols = [
    {
      title: '序号',
      key: 'rowIndex',
      width: 60,
      align: 'center',
      customRender: function (text, row, index) {
        if (row.totalName == '合计') {
          return {
            children: vm.transformVnode('合计'),
            attrs: {
              colSpan: 3,
            },
          }
        } else if (row.serialnumber) {
          return undefined
        }
        else {
          return (vm.ipagination.current - 1) * 10 + Number(index - 1)
        }
      }
    },
    {
      title: '总包部/指挥部名称',
      align: 'center',
      dataIndex: 'zbbzhb',
      key: 'zbbzhb',
      customRender: function (text, row, index) {
        if (row.totalName == '合计') {
          return {
            attrs: {
              colSpan: 0,
            },
          }
        } else
          return {
            children: vm.TransformVnodeEllipsis(text, row, 'zbbzhb')
          }
      }
    },
    {
      title: '项目名称',
      align: 'center',
      dataIndex: 'xmmc',
      key: 'xmmc',
      customRender: function (text, row, index) {
        if (row.totalName == '合计') {
          return {
            attrs: {
              colSpan: 0,
            },
          }
        } else
          return {
            children: vm.TransformVnodeEllipsis(text, row, 'xmmc')
          }
      }
    },
    {
      title: '工程所在地（省市）',
      align: 'center',
      dataIndex: 'gcszd',
      key: 'gcszd',
      scopedSlots: { customRender: 'gcszd' },
    },
    {
      title: '项目类型',
      align: 'center',
      dataIndex: 'xmlx',
      key: 'xmlx',
      scopedSlots: { customRender: 'xmlx' },
    },
    {
      title: '业主情况',
      align: 'center',
      children: [
        {
          title: '业主类别',
          align: 'center',
          dataIndex: 'yzlb',
          key: 'yzlb',
          scopedSlots: { customRender: 'yzlb' },
        },
        {
          title: '业主名称',
          align: 'center',
          dataIndex: 'yzmc',
          key: 'yzmc',
          scopedSlots: { customRender: 'yzmc' },
        },
      ]
    },
    {
      title: '项目状态（久竣未结/已竣未结/已竣已结）',
      align: 'center',
      dataIndex: 'xmzt',
      key: 'xmzt',
      scopedSlots: { customRender: 'xmzt' },
    },
    {
      title: '是否已列入股份公司专项治理清单',
      align: 'center',
      dataIndex: 'ifzxzl',
      key: 'ifzxzl',
      scopedSlots: { customRender: 'ifzxzl' },
    },
    {
      title: '工期情况',
      align: 'center',
      children: [
        {
          title: '合同开工工期',
          align: 'center',
          dataIndex: 'htydrq',
          key: 'htydrq',
          scopedSlots: { customRender: 'htydrq' },
        },
        {
          title: '合同完工日期',
          align: 'center',
          dataIndex: 'wgrq',
          key: 'wgrq',
          scopedSlots: { customRender: 'wgrq' },
        },
        {
          title: '实际开工日期',
          align: 'center',
          dataIndex: 'sjkgrq',
          key: 'sjkgrq',
          scopedSlots: { customRender: 'sjkgrq' },
        },
        {
          title: '竣工验收日期',
          align: 'center',
          dataIndex: 'jgysrq',
          key: 'jgysrq',
          scopedSlots: { customRender: 'jgysrq' },
        },
        {
          title: '停工日期',
          align: 'center',
          dataIndex: 'tgrq',
          key: 'tgrq',
          scopedSlots: { customRender: 'tgrq' },
        },
        {
          title: '最近一期验工计价日期',
          align: 'center',
          dataIndex: 'ygjjrq',
          key: 'ygjjrq',
          scopedSlots: { customRender: 'ygjjrq' },
        },
      ]
    },
    {
      align: 'center',
      slots: { title: "endTimeTitleA" },
      children: [
        {
          title: '已计价',
          align: 'center',
          dataIndex: 'yjj',
          key: 'yjj',
          scopedSlots: { customRender: 'yjj' },
        },
        {
          title: '待批复变更索赔',
          align: 'right',
          dataIndex: 'dpfbgsp',
          key: 'dpfbgsp',
          scopedSlots: { customRender: 'dpfbgsp' },
        },
      ]
    },
    {
      align: 'center',
      slots: { title: "endTimeTitleB" },
      children: [
        {
          title: '合同额',
          align: 'right',
          dataIndex: 'hte',
          key: 'hte',
          scopedSlots: { customRender: 'hte' },
        },
        {
          title: '已计价（含变更调差等）',
          align: 'right',
          dataIndex: 'yjjbgtc',
          key: 'yjjbgtc',
          scopedSlots: { customRender: 'yjjbgtc' },
        },
        {
          title: '已完未计（含变更调差等）',
          align: 'right',
          dataIndex: 'ywwjbgtc',
          key: 'ywwjbgtc',
          scopedSlots: { customRender: 'ywwjbgtc' },
        },
        {
          title: '各参建单位简称',
          align: 'center',
          dataIndex: 'cjdwjc',
          key: 'cjdwjc',
          scopedSlots: { customRender: 'cjdwjc' },
        },
      ]
    },
    {
      title: '截至2022年9月末债权债务及资金收支情况',
      align: 'center',
      slots: { title: "endTimeTitleC" },
      children: [
        {
          title: '实际收到工程款',
          align: 'right',
          dataIndex: 'sjgck',
          key: 'sjgck',
          scopedSlots: { customRender: 'sjgck' },
        },
        {
          title: '支付参建单位工程款',
          align: 'right',
          dataIndex: 'cjdwgck',
          key: 'cjdwgck',
          scopedSlots: { customRender: 'cjdwgck' },
        },
        {
          title: '应收账款-工程款',
          align: 'right',
          dataIndex: 'yszkGck',
          key: 'yszkGck',
          scopedSlots: { customRender: 'yszkGck' },
        },
        {
          title: '长期应收款-工程款',
          align: 'right',
          dataIndex: 'cqyskGck',
          key: 'cqyskGck',
          scopedSlots: { customRender: 'cqyskGck' },
        },
      ]
    },
    {
      title: '未完成竣工结算原因、工作目标、下一步措施简述（另附书面说明）',
      align: 'center',
      dataIndex: 'reason',
      key: 'reason',
      scopedSlots: { customRender: 'reason' },
    },
    {
      title: '备注',
      align: 'center',
      dataIndex: 'remark',
      key: 'remark',
      scopedSlots: { customRender: 'remark' },
    },
    {
      dataIndex: 'submitFlag',
      align: 'center',
      title: "状态",
      scopedSlots: { customRender: 'submitFlag' },
      key: 'submitFlag',
      fixed: 'right',
      width: 80,
    },
    {
      dataIndex: 'action',
      align: 'center',
      title: "操作",
      scopedSlots: { customRender: 'action' },
      key: 'action',
      width: 100,
      fixed: 'right',
    }
  ]
  return cols
}

export default columns